﻿using UnityEngine;
using TinyWnd;

public class BattleMgr : MonoBehaviour
{
    static BattleMgr _inst;
    public static BattleMgr inst { get { return _inst; } }

    [SerializeField]
    GameObject goBattle;
    [SerializeField]
    GameObject goScene;

    void Awake()
    {
        _inst = this;
    }

    public void EnterBattle()
    {
        goBattle.SetActive(true);
        goScene.SetActive(false);

        var inst = WndMgr.inst;
        inst.HideWnds();
        inst.ShowWindow(WndId.matching);
    }

    public void LeaveBattle()
    {
        goBattle.SetActive(false);
        goScene.SetActive(true);
        
        var inst = WndMgr.inst;
        inst.RestoreWnds();
    }
}
